import useServer from "server";
import { KanbanType } from "types";
import { useQuery } from "react-query";

export const useKanbans = (param?: Partial<KanbanType>) => {
  const client = useServer();

  return useQuery<KanbanType[]>(["kanbans", param], () => {
    return client("kanbans", { data: param });
  });
};
